import { Avatar } from 'antd';
import { getToken } from '@inbiz/utils';

function UserAvatar(props: { userId: any; }) {
  const token = getToken();
  return (
    <Avatar
      src={`${InbizConfig.HOST}/Imagetype/GetUserAvatar?token=${token}&userId=${
        props.userId
      }&flag=${new Date().getTime()}`}
      style={{
        verticalAlign: 'middle',
        marginRight: 15,
        borderRadius: '50%',
        width: 25,
        height: 25,
      }}
    />
  );
}

export default UserAvatar;
